package com.itheima.logback.d1;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LogbackDemo {
    //创建log back的日志对象
    public static final  Logger LOGGER =  LoggerFactory.getLogger("LogbackDemo.class");
    public static void main(String[] args) {
        // 快速搭建logback
            try {
                LOGGER.debug("main方法开始执行");
                LOGGER.info("开始记录第二行，除法");
                int a = 10;
                int b = 0;
                LOGGER.trace("a= "+a);
                System.out.println(a/b);
            } catch (Exception e) {
                e.printStackTrace();
                LOGGER.error("功能异常"+e);
            }
    }
}
